from django.urls import path
from .views import UserView, AddressView

urlpatterns = [
    # User 的操作路由
    path('users/', UserView.as_view(), name='user_list'),  # GET: 列出所有，POST: 创建新
    path('users/<int:pk>/', UserView.as_view(), name='user_detail'),  # PUT: 更新，DELETE: 删除

    # Address 的操作路由
    path('addresses/', AddressView.as_view(), name='Address_list'),  # GET: 列出所有，POST: 创建新
    path('addresses/<int:pk>/', AddressView.as_view(), name='Address_detail'),  # PUT: 更新，DELETE: 删除
]
